SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE dbo.[DnnProduct_GetRoles]
AS 
	SELECT 
		R.*,
		(SELECT COUNT(*) FROM dbo.DnnProduct_UserRoles U WHERE U.RoleID = R.RoleID) AS UserCount
	FROM   dbo.DnnProduct_Roles AS R

GO
